package com.pym.tool.room.entity

import androidx.room.Entity
import androidx.room.PrimaryKey


@Entity(tableName = "money")
data class MoneyEntity(
    @PrimaryKey(autoGenerate = true)
    var id: Int = 0,
    var time: Long = 0,
    var type: Int = 0,
    var number: Int = 0,
    var message: String = "",
) {
    /**
     * 需要给对象提前赋值，不然this会一直显示报错
     */
    constructor(type: Int, number: Int, message: String) : this() {
        time = System.currentTimeMillis();
        this.type = type
        this.number = number
        this.message = message
    }
}

